package cn.wolfcode.ssm.web.controller;

import cn.wolfcode.ssm.domain.Business;
import cn.wolfcode.ssm.service.IBusinessService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class IndexController {

    @Autowired
    private IBusinessService businessService;

    @RequestMapping("/index")
    public String index(Model model){
        Business business = businessService.selectByMainStore();
        model.addAttribute("business",business);
        return "index";
    }


}
